home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 March
/
CMCD0305.ISO
/
Software
/
Shareware
/
Utilitare
/
emu
/
Emu8086_Setup_307c.exe
/
{app}
/
Samples
/
bcd_aas.asm
< prev
next >
Wrap
Assembly Source File
|
2002-08-02
|
431b
|
32 lines
; This is an example of AAS
; instruction, it is used to
; subtract huge BCD numbers.
#make_COM#
ORG 100h
; make 5 - 9
; AL = 0FCh (not BCD form)
MOV AL, 05h
MOV BL, 09h
SUB AL, BL
; convert to BCD,
; AL = 6
; (and 1 is borrowed from AH,
; like calculating 15 - 9):
AAS
; convert to printable symbol:
OR AL, 30h
; print char in AL using BIOS
; teletype function:
MOV AH, 0Eh
INT 10h
RET
END